package com.stardata.liangshisq.tcslmon.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.stardata.liangshisq.tcslmon.entity.ArchItem;
import com.stardata.liangshisq.tcslmon.entity.ArchPoint;
import com.stardata.liangshisq.tcslmon.entity.BizBs;
import com.stardata.liangshisq.tcslmon.mapper.ArchItemMapper;
import com.stardata.liangshisq.tcslmon.mapper.ArchPointMapper;
import com.stardata.liangshisq.tcslmon.service.OrderPushService;
import com.stardata.liangshisq.tcslmon.service.SysParameterService;
import com.stardata.liangshisq.tcslmon.util.CommonConstants;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@AllArgsConstructor
public class OrderPushServiceImpl implements OrderPushService {

    private final ArchItemMapper archItemMapper;

    private final ArchPointMapper archPointMapper;

    private final SysParameterService parameterService;

    @Override
    public List<ArchItem> sendArchItem() {
        String shopId = parameterService.getByCode("shopId");
        QueryWrapper<ArchItem> wrapper = new QueryWrapper<ArchItem>();
        return archItemMapper.selectList(wrapper);
    }
    @Override
    public List<ArchPoint> sendArchPoint() {
        String shopId = parameterService.getByCode("shopId");
        QueryWrapper<ArchPoint> wrapper = new QueryWrapper<ArchPoint>();
        wrapper.eq("belong_shop_id", Long.valueOf(shopId));
        return archPointMapper.selectList(wrapper);
    }


}
